import Vue from 'vue'
Vue.directive("money", {
  inserted: function(el) {
      el.addEventListener("keypress", function(e) {
          var that = this
          // 通过正则过滤小数点后两位
          e.target.value = (e.target.value.match(/^\d*(.?\d{0,1})/g)[0])
      })
  }
})


